package com.clstu.homeworks;

public class HomeWork04 {
    public static void main(String[] args) {
        countString("helloworld12334566LJDFJLDJL df f a f f");
    }
    public static void countString(String s){
        int big=0;
        int little=0;
        int digit=0;
        int other=0;
        char[] cs=s.toCharArray();
        for(char c:cs){
            if(c>='a'&&c<='z') little++;
            else if(c>='A'&&c<='Z') big++;
            else if(c>='0'&&c<='9')digit++;
            else other++;
        }
        System.out.println("数字有："+digit);
        System.out.println("大写有："+big);
        System.out.println("小写有："+little);
        System.out.println("其他有："+other);
    }
}
